package com.q.qpicturebackend.service;

import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.q.qpicturebackend.exception.BusinessException;
import com.q.qpicturebackend.exception.ErrorCode;
import com.q.qpicturebackend.exception.ThrowUtils;
import com.q.qpicturebackend.model.dto.space.SpaceAddRequest;
import com.q.qpicturebackend.model.dto.space.SpaceQueryRequest;
import com.q.qpicturebackend.model.entity.Space;
import com.baomidou.mybatisplus.extension.service.IService;
import com.q.qpicturebackend.model.entity.User;
import com.q.qpicturebackend.model.enums.SpaceLevelEnum;
import com.q.qpicturebackend.model.vo.PictureVO;
import com.q.qpicturebackend.model.vo.SpaceVO;

import javax.servlet.http.HttpServletRequest;

/**
 * @author 陈奕岐
 * @description 针对表【space(空间)】的数据库操作Service
 * @createDate 2025-06-02 22:13:41
 */
public interface SpaceService extends IService<Space> {


    void validSpace(Space space, boolean add);

    void fillSpaceBySpaceLevel(Space space);

    SpaceVO getSpaceVO(Space space, HttpServletRequest request);

    Page<SpaceVO> getSpaceVOPage(Page<Space> spacePage, HttpServletRequest request);

    QueryWrapper<Space> getQueryWrapper(SpaceQueryRequest spaceQueryRequest);

    long addSpace(SpaceAddRequest spaceAddRequest, User loginUser);
}
